﻿using Exam.infranstuctrue.Dto.Request.Exam;
using Exam.infranstuctrue.Dto.Respones;
using Exam.infranstuctrue.Tools.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Exam.Service.Interface
{
    [IProvider]
    public interface ITestPaperServer
    {
        /// <summary>
        /// 获取试卷列表
        /// </summary>
        /// <param name="limit"></param>
        /// <param name="paeg"></param>
        /// <param name="key"></param>
        /// <param name="IsPublic"></param>
        /// <param name="IsBan"></param>
        /// <returns></returns>
        Task<ApiResult> GetTestPaper(int page = 1, int limit = 10, string key = "", int IsPublic = -1, int IsBan = -1);
        /// <summary>
        /// 组卷 --随机
        /// </summary>
        /// <returns></returns>
        Task<ApiResult> ConstituteTestPage(int count, int minLv, int maxLv);

        /// <summary>
        /// 组卷 --人工
        /// </summary>
        /// <param name="lable"></param>
        /// <returns></returns>
        Task<ApiResult> ArtificialTestPage(int page=1, int limit=10, string key = "");
        /// <summary>
        /// 添加试卷
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> RandomAddTestPage(AddTestPageDto dto);
        /// <summary>
        /// 删除试卷
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> DeleteTestPaper(List<AddTestPageDto> dto);
        /// <summary>
        /// 获取单个试卷
        /// </summary>
        /// <param name="tpid"></param>
        /// <param name="limit"></param>
        /// <param name="page"></param>
        /// <param name="key"></param>
        /// <returns></returns>
        Task<ApiResult> GetEchoTestPaper(string tpid, int page, int limit, string key = "");
        /// <summary>
        /// 修改试卷
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> UpdateTestPaper(AddTestPageDto dto);
        /// <summary>
        /// 是否发布
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> IsPublic(List<AddTestPageDto> dto);
        /// <summary>
        /// 是否禁用
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> IsBan(List<AddTestPageDto> dto);
    }
}
